package com.spn.blog.service.login;


import com.spn.blog.common.dao.pojo.ChatHistory;
import com.spn.blog.common.dao.pojo.SysUser;
import com.spn.blog.common.vo.Result;
import com.spn.blog.common.vo.UserVo;

import java.util.List;
import java.util.Map;

public interface SysUserService {
    SysUser findUserById(String id);

    SysUser findUser(String account, String password);

    /**
     * 根据token查询用户信息
     * @param token
     * @return
     */
    Result findUserByToken(String token);

    /**
     * 根据账号查找用户
     * @param account
     * @return
     */
    SysUser findUserByAccount(String account);

    UserVo findUserVoById(String authorId);

    Result findUserDetailByToken(String token);

    /**
     * 判断tp用户和sys用户是否绑定
     * @param id
     * @return
     */
    SysUser findUserBytpUserId(String id);

    Result sendSms(String phone);

    Result upload(Map<String, Object> imgMap, String userId);

    SysUser findUserByEmail(String email);

    Integer updateById(SysUser sysUser);

    Integer save(SysUser sysUser);

    SysUser getOne(String password, String email);

    Integer initAccessDenied(String id);

    List<String> selectPermsByUserId(String id);

    Result getAllFriends(String token);

    Result getHistoryMsg(String token, String to);

    boolean insertChatHistory(ChatHistory chatHistory);
}
